﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace chatblog.login
{
    public partial class qianming : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cbuser.dealcookie();
                dealrequest();
                bind1();
                //bind2();
                //bind3();
            }
        }
        /// <summary>
        /// 绑定
        /// </summary>
        private void bind1()
        {
            cbuser u = cbuser.Find(" cbuserid = '" + AliApi.appUserId + "'", "RECID");
            Fck_Content.Value = Server.HtmlDecode(u.qianming.ToString());
        }
        private void dealrequest()
        {
            if (AliApi.appUserId == "")
            {
                Response.Redirect(ResolveUrl("~/default.aspx"));
            }
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            cbuser u = cbuser.Find(" cbuserid = '" + AliApi.appUserId + "'", "RECID");
            u.qianming.StringValue = Fck_Content.Value;
            u.Modify();
            MessageBox.Show(this.Page, "设置成功");
        }

    }
}
